/**
 * Copyright 2016 JustWayward Team
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.zhuike.novel.app.bean;

import net.zhuike.novel.app.bean.base.Base;

import java.io.Serializable;
import java.util.List;

/**
 * @author yuyh.
 * @date 2016/8/4.
 */
public class Recommend extends Base {

    public List<RecommendBooks> list;

    public static class RecommendBooks implements Serializable {

        /**
         "id":38886,
         "name":"大主宰",
         "author":"天蚕土豆",
         "novelType":"玄幻",
         "cover":"http://qidian.qpic.cn/qdbimg/349573/2750457/180",
         "chapterId":"377224422",
         "chapterName":"第一千五百五十一章邪神陨落（大结局）",
         "chapterCount":"0",
         "lastestUpdateTime":"377224422",
         "description":"大千世界，位面交汇，万族林立，群雄荟萃，一位位来自下位面的天之至尊，在这无尽世界，演绎着令人向往的传奇，追求着那主宰之路。<br/>无尽火域，炎帝执掌，万火焚苍穹。<br/>武境之内，武祖之威，震慑乾坤。<br/>西天之殿，百战之皇，战威无可敌。<br/>北荒之丘，万墓之地，不死之主镇天地。<br/>......<br/>少年自北灵境而出，骑九幽冥雀，闯向了那精彩绝伦的纷纭世界，主宰之路，谁主沉浮？<br/>大千世界，万道争锋，吾为大主宰。<br/>",
         "progress":"已完本",
         "words":"4976300",
         "site":"qidian.com"
         */
        public static final int STATUS_UNCACHE = 0; //未缓存
        public static final int STATUS_CACHING = 1; //正在缓存
        public static final int STATUS_CACHED = 2;  //已经缓存
        public String id;
        public String aid;
        public String author;
        public String cover;
        public String description;
        public String name;
        public String chapterId;
        public String chapterName;
        public String chapterCount;
        public String lastestUpdateTime;
        public String progress;
        public String words;
        public boolean hasCp;
        public boolean isTop = false;
        public boolean isSeleted = false;
        public boolean showCheckBox = false;
        public boolean isFromSD = false;
        public String path = "";
        public int latelyFollower;
        public double retentionRatio;
        public String updated = "";
        public int chaptersCount;
        public String lastChapter;
        public String recentReadingTime = "";
        //是否是本地文件
        private boolean isLocal = false;
        @Override
        public boolean equals(Object obj) {
            if (obj instanceof RecommendBooks) {
                RecommendBooks bean = (RecommendBooks) obj;
                return this.id.equals(bean.id);
            }
            return super.equals(obj);
        }

        @Override
        public int hashCode() {
            return this.id.hashCode();
        }
    }
}
